<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <ui:composition template="/template/DefaultTemplate.xhtml">

        <ui:define name="content">
          
            <h:form>
                 <p:panel toggleable="true" id="customerCreate" header="Search Sales Leads">
                <h:panelGrid columns="3">
                    <h:outputLabel value="#{bundle.SearchSalesLeadEntityLabel_searchAttribute}" for="searchAttribute" />
                    <p:inputText id="searchInput" value="#{salesLeadEntityController.userSearchInput}" required="true" requiredMessage="Please enter some information"/>
                    <h:message styleClass="errorMsg" for="searchInput"/>
                    
                    <h:outputLabel value="#{bundle.SearchSalesLeadEntityLabel_searchField}" for="searchBy" />
                    <h:selectOneMenu id="searchField" value="#{salesLeadEntityController.searchField}">
                        <f:selectItem id="firstNameSearchField" itemLabel="First Name" itemValue="firstName" />
                        <f:selectItem id="lastNameSearchField" itemLabel="Last Name" itemValue="lastName" />
                        <f:selectItem id="companySearchField" itemLabel="Company" itemValue="companyName" />
                        <f:selectItem id="jobTitleSearchField" itemLabel="Job Title" itemValue="jobTitle" />
                        <f:selectItem id="createdBySearchField" itemLabel="Created By" itemValue="createdBy" />
                    </h:selectOneMenu>
                    <h:message styleClass="errorMsg" for="searchBy"/>
                </h:panelGrid>
                <p:commandButton ajax="false" action="#{salesLeadEntityController.prepareSearch}" value="Search" />
              
                </p:panel>
               
            </h:form>
        </ui:define>
    </ui:composition>

</html>
